{%extends "base.html"%}
{%block body%}
<h2>{{ problem.name }}</h2>

<p>{{ problem.description }}</p>

<h3>Examples</h3>
<pre>
{{ problem.examples }}
</pre>

  <form method="post" action="/run/">
    <p><strong>Enter your solution here:</strong></p>
    <p><textarea id="code-area" name="user_code" rows="22" cols="80">
{% ifequal pu.classname "ProblemUser" %}{{ pu.solution }}{% else %}{{ problem.skeleton }}{% endifequal %}
      
    </textarea></p>
    <input type="hidden" name="problem_id" value="{{ problem.key.id }}" />
    <p><input type="submit" name="submit" value="Run" /></p>
  </form>

  <script language="javascript" type="text/javascript" src="/static/edit_area_full.js"></script>
  <script language="javascript" type="text/javascript">
    editAreaLoader.init({
      id: "code-area",
      syntax: "python",
      start_highlight: true,
      allow_resize: "no",
      font_size: 14,
      toolbar: "new_document, |, help",
      replace_tab_by_spaces: 4
    });
  </script>
{%endblock%}
